package com.seal.tsms.system.entity;

import java.io.Serializable;

/**
 * Created by seal.jing on 2016/1/2.
 */

public class UserRolePk implements Serializable{
    private SystemUser user;
    private SystemRole role;

    public SystemUser getUser() {
        return user;
    }

    public void setUser(SystemUser user) {
        this.user = user;
    }

    public SystemRole getRole() {
        return role;
    }

    public void setRole(SystemRole role) {
        this.role = role;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserRolePk that = (UserRolePk) o;

        if (!user.equals(that.user)) return false;
        return role.equals(that.role);

    }

    @Override
    public int hashCode() {
        int result = user.hashCode();
        result = 31 * result + role.hashCode();
        return result;
    }
}
